{{- $share := (.Scratch.Get "params").share | default dict -}}
{{- if $share.enable -}}
    {{- /* 000: Telegram */ -}}
    {{- if $share.Telegram -}}
    <div class="share-link">
        <a class="share-icon share-telegram" href="javascript:void(0);" title="{{ T `shareOn` }} Telegram" data-sharer="telegram" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Telegram }} data-via="{{ . }}"{{ end }}{{ with .Params.tags }} data-hashtags="{{ delimit . `,` }}"{{ end }}>
            {{- dict "Class" "svg-social-icon icon-telegram" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 001: Twitter */ -}}
    {{- if $share.Twitter -}}
    <div class="share-link">
        <a class="share-icon share-twitter" href="javascript:void(0);" title="{{ T `shareOn` }} Twitter" data-sharer="twitter" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.tags }} data-hashtags="{{ delimit . `,` }}"{{ end }}>
            {{- dict "Class" "svg-social-icon icon-twitter" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 002: Facebook */ -}}
    {{- if $share.Facebook -}}
    <div class="share-link">
        <a class="share-icon share-facebook" href="javascript:void(0);" title="{{ T `shareOn` }} Facebook" data-sharer="facebook" data-url="{{ .Permalink }}"{{ with .Params.tags }} data-hashtag="{{ index . 0 }}"{{ end }}>
            {{- dict "Class" "svg-social-icon icon-facebook" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 003: Linkedin */ -}}
    {{- if $share.Linkedin -}}
    <div class="share-link">
        <a class="share-icon share-linkedin" href="javascript:void(0);" title="{{ T `shareOn` }} Linkedin" data-sharer="linkedin" data-url="{{ .Permalink }}">
            {{- dict "Class" "svg-social-icon icon-linkedin" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 004: WhatsApp */ -}}
    {{- if $share.Whatsapp -}}
    <div class="share-link">
        <a class="share-icon share-whatsapp" href="javascript:void(0);" title="{{ T `shareOn` }} WhatsApp" data-sharer="whatsapp" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-web>
            {{- dict "Class" "svg-social-icon icon-whatsapp" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 005: Viber */ -}}
    {{- if $share.Viber -}}
    <div class="share-link">
        <a class="share-icon share-viber" href="javascript:void(0);" title="{{ T `shareOn` }} Viber" data-sharer="viber" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
            {{- dict "Class" "svg-social-icon icon-viber" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 006: Pinterest */ -}}
    {{- if $share.Pinterest -}}
    <div class="share-link">
        <a class="share-icon share-pinterest" href="javascript:void(0);" title="{{ T `shareOn` }} Pinterest" data-sharer="pinterest" data-url="{{ .Permalink }}"{{ with .Description }} data-description="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}>
            {{- dict "Class" "svg-social-icon icon-pinterest" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 007: Tumblr */ -}}
    {{- if $share.Tumblr -}}
    <div class="share-link">
        <a class="share-icon share-tumblr" href="javascript:void(0);" title="{{ T `shareOn` }} Tumblr" data-sharer="tumblr" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Description }} data-caption="{{ . }}"{{ end }}{{ with .Params.tags }} data-tags="{{ delimit . `,` }}"{{ end }}>
            {{- dict "Class" "svg-social-icon icon-tumblr" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 009: Reddit */ -}}
    {{- if $share.Reddit -}}
    <div class="share-link">
        <a class="share-icon share-reddit" href="javascript:void(0);" title="{{ T `shareOn` }} Reddit" data-sharer="reddit" data-url="{{ .Permalink }}">
            {{- dict "Class" "svg-social-icon icon-reddit" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 010: VK */ -}}
    {{- if $share.VK -}}
    <div class="share-link">
        <a class="share-icon share-vk" href="javascript:void(0);" title="{{ T `shareOn` }} VK" data-sharer="vk" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Description }} data-caption="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}>
            {{- dict "Class" "svg-social-icon icon-vk" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 011: Buffer */ -}}
    {{- if $share.Buffer -}}
    <div class="share-link">
        <a class="share-icon share-buffer" href="javascript:void(0);" title="{{ T `shareOn` }} Buffer" data-sharer="buffer" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-picture="{{ . }}"{{ end }}>
            {{- dict "Class" "svg-social-icon icon-buffer" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 012: Xing */ -}}
    {{- if $share.Xing -}}
    <div class="share-link">
        <a class="share-icon share-xing" href="javascript:void(0);" title="{{ T `shareOn` }} Xing" data-sharer="xing" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
            {{- dict "Class" "svg-social-icon icon-xing" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 013: Line */ -}}
    {{- if $share.Line -}}
<div class="share-link">
        <a class="share-icon share-line" href="javascript:void(0);" title="{{ T `shareOn` }} Line" data-sharer="line" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
            {{- dict "Simpleicons" "line" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
        </a>
</div>
    {{- end -}}

    {{- /* 014: Instapaper */ -}}
    {{- if $share.Instapaper -}}
<div class="share-link">
        <a class="share-icon share-instapaper" href="javascript:void(0);" title="{{ T `shareOn` }} Instapaper" data-sharer="instapaper" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
            {{- dict "Simpleicons" "instapaper" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
        </a>
</div>
    {{- end -}}

    {{- /* 015: Pocket */ -}}
    {{- if $share.Pocket -}}
    <div class="share-link">
        <a class="share-icon share-pocket" href="javascript:void(0);" title="{{ T `shareOn` }} Pocket" data-sharer="pocket" data-url="{{ .Permalink }}">
            {{- dict "Class" "svg-social-icon icon-pocket" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 016: Digg */ -}}
    {{- if $share.Digg -}}
    <div class="share-link">
        <a class="share-icon share-digg" href="javascript:void(0);" title="{{ T `shareOn` }} Digg" data-sharer="digg" data-url="{{ .Permalink }}">
            {{- dict "Class" "svg-social-icon icon-digg" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 017: StumbleUpon */ -}}
    {{- if $share.Stumbleupon -}}
    <div class="share-link">
        <a class="share-icon share-stumbleupon" href="javascript:void(0);" title="{{ T `shareOn` }} StumbleUpon" data-sharer="stumbleupon" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
            {{- dict "Class" "svg-social-icon icon-stumbleupon" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 018: Flipboard */ -}}
    {{- if $share.Flipboard -}}
    <div class="share-link">
        <a class="share-icon share-flipboard" href="javascript:void(0);" title="{{ T `shareOn` }} Flipboard" data-sharer="flipboard" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
            {{- dict "Class" "svg-social-icon icon-flipboard" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 019: 微博 */ -}}
    {{- if $share.Weibo -}}
    <div class="share-link">
        <a class="share-icon share-weibo" href="javascript:void(0);" title="{{ T `shareOn` }} 微博" data-sharer="weibo" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}{{ with .Site.Params.Social.Weibo }} data-ralateuid="{{ . }}"{{ end }}>
            {{- dict "Class" "svg-social-icon icon-weibo" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 020: 人人 */ -}}
    {{- if $share.Renren -}}
    <div class="share-link">
        <a class="share-icon share-renren" href="javascript:void(0);" title="{{ T `shareOn` }} 人人" data-sharer="renren" data-url="{{ .Permalink }}">
            {{- dict "Class" "svg-social-icon icon-renren" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 021: Myspace */ -}}
    {{- if $share.Myspace -}}
    <div class="share-link">
        <a class="share-icon share-myspace" href="javascript:void(0);" title="{{ T `shareOn` }} Myspace" data-sharer="myspace" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
            {{- dict "Simpleicons" "myspace" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 022: Blogger */ -}}
    {{- if $share.Blogger -}}
    <div class="share-link">
        <a class="share-icon share-blogger" href="javascript:void(0);" title="{{ T `shareOn` }} Blogger" data-sharer="blogger" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
            {{- dict "Class" "svg-social-icon icon-blogger" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 023: 百度 */ -}}
    {{- if $share.Baidu -}}
    <div class="share-link">
        <a class="share-icon share-baidu" href="javascript:void(0);" title="{{ T `shareOn` }} 百度" data-sharer="baidu" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
            {{- dict "Simpleicons" "baidu" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 024: OK.RU */ -}}
    {{- if $share.Odnoklassniki -}}
    <div class="share-link">
        <a class="share-icon share-ok" href="javascript:void(0);" title="{{ T `shareOn` }} OK.RU" data-sharer="okru" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
            {{- dict "Class" "svg-social-icon icon-odnoklassniki" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 025: Evernote */ -}}
    {{- if $share.Evernote -}}
    <div class="share-link">
        <a class="share-icon share-evernote" href="javascript:void(0);" title="{{ T `shareOn` }} Evernote" data-sharer="evernote" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
            {{- dict "Class" "svg-social-icon icon-evernote" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 026: Skype */ -}}
    {{- if $share.Skype -}}
    <div class="share-link">
        <a class="share-icon share-skype" href="javascript:void(0);" title="{{ T `shareOn` }} Skype" data-sharer="skype" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
            {{- dict "Class" "svg-social-icon icon-skype" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 027: Trello */ -}}
    {{- if $share.Trello -}}
    <div class="share-link">
        <a class="share-icon share-trello" href="javascript:void(0);" title="{{ T `shareOn` }} Trello" data-sharer="trello" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
            {{- dict "Class" "svg-social-icon icon-trello" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 028: Mix */ -}}
    {{- if $share.Mix -}}
    <div class="share-link">
        <a class="share-icon share-mix" href="//mix.com/add?url={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="{{ T `shareOn` }} Mix">
            {{- dict "Class" "svg-social-icon icon-mix" | partial "plugin/icon.html" -}}
        </a>
    </div>
    {{- end -}}

    {{- /* 029: Hacker News */ -}}
    {{- if $share.Hackernews -}}
    <div class="share-link">
    <a class="share-icon share-hackernews" href="javascript:void(0);" title="{{ T `shareOn` }} Hacker News" data-sharer="hackernews" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
        {{- dict "Class" "svg-social-icon icon-hacker-news" | partial "plugin/icon.html" -}}
    </a>
    </div>
    {{- end -}}
{{- end -}}